﻿namespace Test30.Engine
{
    public class SlowAction : Action
    {
        public SlowAction(Entity entity, int damage)
            : base(entity)
        {
            _damage = damage;
        }

        protected override ActionResult OnProcess()
        {
            // set the speed
            Entity.Speed.SetBonus(BonusType.Slow, -3);
            Entity.Conditions.Slow.AddDuration(20 + (_damage * 4));

            return ActionResult.Done;
        }

        private readonly int _damage;
    }
}
